adds scoped values credential to support multiple endpoints.#58
adds scoped values credential to support multiple endpoints.#58juliohm merged 31 commits intoJuliaClimate:masterfrom ghyatzo:scoped-auth
Conversation
|
I'll add some examples of this new usage in the readme later |
|
Yes. You can run these commands locally in the package folder. They will
modify the Project.toml
Em qui., 16 de jan. de 2025, 12:06, cschen ***@***.***>
escreveu:
… ***@***.**** commented on this pull request.
------------------------------
In src/CDSAPI.jl
<#58 (comment)>
:
> +if VERSION >= v"1.11"
+ using Base.ScopedValues
+elseif VERSION >= v"1.8"
+ import Pkg
+ Pkg.activate(".")
+ Pkg.add("ScopedValues")
+ using ScopedValues
+end
Ok, so then just remove the Pkg.add("ScopedValues")?
—
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZQW3KKMMII4VVL7SALNBL2K7DGVAVCNFSM6AAAAABVG4LWPSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKNJWGQ2DCOBYGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
and various renames
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
|
OK, I've rebased onto master to have the other PRs. |
|
tests pass locally |
|
@ghyatzo the tests are failing. Should we continue the work on this PR? |
|
Hi, we encountered this issue in a previous PR #60 (comment) Have you tried locally? apparently the PR branches do not have access to the secrets in the CI so the fail I saw were there, but locally with my credentials this branch pass all tests (at least, last time I checked, don't know if something else changed in the mean time) |
|
@ghyatzo there are pending review comments. I can try to run things locally again after they are considered. |
renamed the scoped values to the uppercase variant
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
|
ok, sorry for the sloppy last few iterations, should have addressed the latest issues. I've merged master into the PR and tests pass locally. |
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
Enforce presence of key and url in file.
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
|
Tests are passing locally for me, but failing on GitHub Actions. Some of the build failures point to missing credentials. |
I always forget. Sorry for the noise. Merging it. |
Hello,
I had wrote my script for downloading CDS data, before checking if it existed already.
Funnily enough our implementations are eerily similar.
There are some slight differences that I would like to propose as improvements/additions to this package so we can have a single point.
This is the first of 3 pull requests, one for each proposal so they can be addressed independently.
Ok with that out of the way:
I would like to propose the use of scoped values for the API credentials. As well as a bit better credential retrieval mechanism that also checks for environmental variables.
This allows to use different credentials for each request, for example: